package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.InnerMarkDomain;
import com.itheima.stock.pojo.entity.StockMarketIndexInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author Administrator
* @description 针对表【stock_market_index_info(国内大盘数据详情表)】 的数据库操作Mapper
* @createDate 2024-06-30 09:11:21
* @Entity com.itheima.stock.pojo.entity.StockMarketIndexInfo
*/
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);

    /**
     *
     * @param curDate
     * @param marketCodes
     * @return
     */
    List<InnerMarkDomain> getMarkInfo(@Param("curDate") Date curDate, @Param("marketCodes") List<String> marketCodes);


    //统计T日和T-1每分钟交易量
    List<Map> getSumAmtInfo(@Param("openDate") Date openDate, @Param("endDate") Date endDate, @Param("marketCodes") List<String> marketCodes);


    /**
     * 批量插入大盘实体数据
     * @param entitys
     * @return
     */
    int insertbacth(@Param("infos") List<StockMarketIndexInfo> entitys);
}
